package com.lemon.rpcframe.dao.entity;

import java.io.Serializable;
import java.util.Date;

import com.lemon.rpcframe.annotation.SCFMember;
import com.lemon.rpcframe.annotation.SCFSerializable;
import com.lemon.rpcframe.dao.annotation.Id;
import com.lemon.rpcframe.dao.annotation.Table;

/**
 * 任务运行日志
 * 此实体类 来源于jobpro 太多无用的字段了 
 * 
 * @author wangyazhou
 * @version 1.0
 * @date  2015年8月24日 下午5:57:16
 * @see 
 * @since
 */
@Table(name = "t_task_log")
@SCFSerializable
public class TaskLogBean implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @Id
    @SCFMember
    private long ID;

    @SCFMember
    protected long jobId;

    @SCFMember
    private String taskId;//同一个任务的内部序列

    @SCFMember
    protected String taskGroup; // 执行的节点

    @SCFMember
    private String taskIdentity;

    @SCFMember
    private String flag;

    @SCFMember
    private String msg;

    @SCFMember
    private Date startTime; // 日志记录时间

    @SCFMember
    private Date endTime;//任务的最早出发时间

    @SCFMember
    private String logType;// 日志类型

    public long getID() {
        return ID;
    }

    public void setID(long iD) {
        ID = iD;
    }

    public long getJobId() {
        return jobId;
    }

    public void setJobId(long jobId) {
        this.jobId = jobId;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskGroup() {
        return taskGroup;
    }

    public void setTaskGroup(String taskGroup) {
        this.taskGroup = taskGroup;
    }

    public String getTaskIdentity() {
        return taskIdentity;
    }

    public void setTaskIdentity(String taskIdentity) {
        this.taskIdentity = taskIdentity;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        if (endTime == null) {
            endTime = new Date();
        }
        this.endTime = endTime;
    }

    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }

    @Override
    public String toString() {
        return "TaskLogBean [ID=" + ID + ", jobId=" + jobId + ", taskId=" + taskId + ", taskGroup=" + taskGroup + ", taskIdentity=" + taskIdentity + ", flag=" + flag + ", msg=" + msg + ", startTime=" + startTime + ", endTime=" + endTime + ", logType=" + logType + "]";
    }

}
